public class Test1 {
    class TreeNode{
        TreeNode left;
        TreeNode right;
    }
    public static void Mirror(TreeNode root){
        if(root == null){
            return;
        }
        if(root.left == null && root.right == null){
            return;
        }
        TreeNode tmp = root.left;
        root.left = root.right;
        root.right = tmp;
        if(root.left != null){
            Mirror(root.left);
        }
        if(root.right != null){
            Mirror(root.right);
        }
    }
    public static void main(String[] args) {

    }
}
